package main

import "fmt"

// 定义结构体
type person struct {
	name string
	age  int8
	city string
}

func main() {
	var p person
	p.name = "xinKong"
	p.city = "nanJin"
	p.age = 18
	fmt.Printf("%#v\n", p)

	// 匿名结构体
	var user struct {
		name    string
		married bool
	}
	user.name = "xinKong"
	user.married = false
	fmt.Printf("%#v\n", user)
}
